package com.nanhai.buddhist.college.module.collegebase.api.teacher;

import com.nanhai.buddhist.college.framework.common.pojo.CommonResult;
import com.nanhai.buddhist.college.module.collegebase.api.student.vo.UpdatePasswordVO;
import com.nanhai.buddhist.college.module.collegebase.api.teacher.dto.TeacherRespDTO;
import com.nanhai.buddhist.college.module.collegebase.api.teacher.dto.TeacherUserRespDTO;
import com.nanhai.buddhist.college.module.collegebase.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;
import java.util.List;
import java.util.Set;


@Api(tags = "RPC 服务 - 教师数据提供")
@FeignClient(name = ApiConstants.NAME)
public interface TeacherApi {

    String PREFIX = ApiConstants.PREFIX + "/teacher-teachers";

    @GetMapping(PREFIX + "/list")
    @ApiOperation("获取教师列表")
    CommonResult<List<TeacherRespDTO>> getTeacherByIds(@RequestParam("ids") Collection<String> ids);

    @GetMapping(PREFIX + "/info")
    @ApiOperation("获取教师信息")
    CommonResult<TeacherRespDTO> getTeacherById(@RequestParam("id") String id);

    @GetMapping(PREFIX + "/getTeacherByUserName")
    CommonResult<TeacherUserRespDTO> getTeacherByUserName(@RequestParam("username") String studentUsername);

    @GetMapping(PREFIX + "/getStudentSubmitList")
    @ApiOperation("获取(班级辅导员和班主任)教师信息")
    CommonResult<List<TeacherRespDTO>> getTeacherListByStudentId(@RequestParam("studentId") String studentId);

    @PostMapping((PREFIX + "/updatedPassWord"))
    CommonResult<Boolean> updatedStudentPassword(@RequestBody UpdatePasswordVO req);


    @GetMapping(PREFIX + "/AllList")
    @ApiOperation("获取所有教师列表")
    CommonResult<List<TeacherRespDTO>> getAllTeacherList();

  /*  @GetMapping(PREFIX + "/getAdminUserIds")
    @ApiOperation("获取教师的上属用户id")
    CommonResult<Set<String>> getTeacherBossUserId(@RequestParam("id") String id);*/
}
